﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace PServiceBus.Gateway.Interfaces {
    public interface IGatewayServer : IDisposable {
        Action<Exception> ErrorReceived { get; set; }
        void Register<TCommand>(Action<TCommand> command) where TCommand : class;
        void Register<TRequest, TResponse>(Func<TRequest, TResponse> command)
            where TRequest : class
            where TResponse : class;
        void Start();
        IGatewayServer Init(string address);
    }
}
